home *** CD-ROM | disk | FTP | other *** search
/ Tech Arsenal 1 / Tech Arsenal (Arsenal Computer).ISO / tek-19 / hpgl2dxf.zip / HPGL2DXF.TXT < prev   
Text File  |  1992-03-18  |  12KB  |  229 lines

  1.  
  2.  
  3. HPGL2DXF.EXE
  4. Copyright 1992 Quantum Diagnostics, Inc.
  5. Elliott Linker
  6.  
  7. A file conversion utility designed to read a plotter file written in
  8. Hewlett-Packard Graphics Language (HPGL), translate it to AutoDesk
  9. Drawing Exchange Format (DXF) and write the result to a file that may
  10. be imported by AutoCad as a drawing ready for viewing and editing.
  11.  
  12. Designed to run on IBM and compatible PCs, it requires DOS 2.0 or later
  13. and 64k of free RAM.  Strongly recommended are a math coprocessor and a
  14. hard disk, but if you're using AutoCad you probably have all this stuff
  15. anyway.  And, as usual, the more MIPS and megahertz, the better.
  16.  
  17. Designed to be distributed as ShareWare, a complete ensemble consists of
  18. these two files:
  19.     HPGL2DXF.EXE (the utility in executable form)
  20.     HPGL2DXF.TXT (this file)
  21. You may freely copy and distribute this material providing it is distributed
  22. in its entirety, two files, without modification or changes, with copyright
  23. notices and Quantum Diagnostics trademark intact, and provided that no charge
  24. is made except as to reasonably recover materials and distribution costs
  25. without profit.
  26.  
  27. Reference documents used to create this utility were an operator's manual
  28. for Hewlett-Packard drafting plotters dated 1984 with a complete (at that time)
  29. specification of HPGL, a worn-out, discarded manual of AutoCad release 2,
  30. and a printout of a DXFOUT file generated by AutoCad release 10.  Thus we
  31. purport the HPGL implementaion to be accurate to the HP manual specified within
  32. the bounds of the disclaimers stated in this document, and the DXF imple-
  33. mentation to be as accurate as our best guess at the time.  To date we have had
  34. no complaints of syntactical violations of the DXF from any recipients of DXF
  35. files created by this utility.  HPGL/2, which is supported by many laser
  36. printers and other modern graphic devices, is a superset of HPGL and is in
  37. general not supported where it exceeds the limits of HPGL (e.g: certain
  38. arguments that may be floating point in HPGL/2 must be integers in HPGL and
  39. for this utility).
  40.  
  41. No guarantees about this utility are expressed or implied and no liabilty
  42. is assumed by Quantum Diagnostics Inc for any hardship or stress users may
  43. endure from its use.  Your comments, questions, and suggestions are welcome.
  44.  
  45. Version 1.1 status
  46. __________________
  47.  
  48. Supports a subset of HPGL.  Current restrictions:
  49.     Assumes HPGL is in "RS-232C" mode as opposed to "HP-IB" mode,
  50.         i.e.: line-feeds are NOT interpreted as instruction terminators.
  51.     Scientific notation in floating point arguments NOT supported.
  52.     Escape operators are ignored and a message is displayed to inform
  53.         the user each time one is encountered; typically this is harmless.
  54.     HPGL operators not within the subset supported are ignored and a message
  55.         is displayed to the user who may determine whether some action should
  56.         be taken.  Typically no action is necessary, and when action is needed
  57.         it is probably easily accomplished in the AutoCad drawing editor.
  58.     Current status of the HPGL subset is as follows:
  59.  
  60.               fully         partially        not yet        no intention
  61.     op      supported       supported       supported        to support
  62.     --      ---------       ---------       ---------       ------------
  63.     
  64.     AA          X
  65.     AF                                                             X
  66.     AH                                                             X
  67.     AP                                                             X
  68.     AR          X
  69.     AS                                                             X
  70.     BL                                          X
  71.     CA                                          X
  72.     CC                                                             X
  73.     CI          X
  74.     CM                                                             X
  75.     CP          X
  76.     CS                                          X
  77.     CT                                                             X
  78.     DC                                                             X
  79.     DF                                          X
  80.     DI          X
  81.     DL                                                             X
  82.     DP                                                             X
  83.     DR                                          X
  84.     DS                                                             X
  85.     DT                                          X
  86.     EA                                          X
  87.     EC                                                             X
  88.     EP                                          X
  89.     ER                                          X
  90.     ES                                          X
  91.     EW                                          X
  92.     FP                                          X
  93.     FR                                          X
  94.     FS                                                             X
  95.     FT                                                             X
  96.     GP                                                             X
  97.     IM                                                             X
  98.     IN                                          X
  99.     IP                                                             X
  100.     IV                                                             X
  101.     IW                                                             X
  102.     LB          X
  103.     LO                                          X
  104.     LT                                          X
  105.     NR                                                             X
  106.     O*                                                             X
  107.     PA          X
  108.     PB                                          X
  109.     PD          X
  110.     PG                                                             X
  111.     PM                                          X
  112.     PR          X
  113.     PT                                          X
  114.     PU          X
  115.     RA                                          X
  116.     RO                                          X
  117.     RR                                          X
  118.     SA                                          X
  119.     SC          X
  120.     SG                                                             X
  121.     SI                          X
  122.     SL                                          X
  123.     SM                                          X
  124.     SP                          X
  125.     SR                          X
  126.     SS                                          X
  127.     TL                                          X
  128.     UC                                          X
  129.     UF                                          X
  130.     VS                                          X
  131.     WG                                          X
  132.     XT                                          X
  133.     YT                                          X
  134.     
  135. AutoCad features supported:
  136.     Lines, Text, Arcs, Circles (we suggest defining MONOSPACE as the default
  137.         font for text in your drawing as a start, then you can experiment
  138.         with other text styles).
  139.     The DXF file created is "entities only" and must be imported to an
  140.         existing (possibly blank) drawing.
  141.     Features are placed in the X-Y plane and all Z axis coordinates are
  142.         forced to 0.
  143.     Features are assigned to Layers by pen # (Layer name = Pen# - 1).
  144.     LineTypes NOT supported (use pens and BYLAYER).
  145.  
  146. To invoke the program use the following command line syntax at the DOS prompt:
  147.  
  148. HPGL2DXF [d:][path]source[.ext] [[d:][path][dest[.ext]]] [/opt[ ][/opt]...]
  149.  
  150. where "source" is the input file in ascii hpgl which is assumed to be in the
  151. current directory, on drive "d:" (if specified), or in directory "path" (if 
  152. specified),
  153. and "dest" is the output file in ascii dxf format which will be written to the
  154. current directory, on drive "d:" (if specified), or in directroy "path" (if
  155. specified) named according to the conditions below,
  156. and configuration of scale and other attributes will conform to the option
  157. switches "/opt" contained on the command line consisting of a leading slash
  158. character followed by a code described below.
  159.  
  160. Invoking HPGL2DXF without any arguments displays the syntax usage message.
  161.  
  162. If source contains no extension and the file does not exist, hpgl2dxf will 
  163. attempt to open a file of that name with the extension .PLT.
  164.  
  165. If dest is not named, the file name of source will be used with the extension
  166. .DXF added.  If dest is named but contains no extension, the .DXF extension
  167. will be added.  To obtain an output file with no extension, put a dot after the
  168. file name on the command line (null extension).
  169.  
  170. Valid option switches are:
  171.     /p    create polylines - this switch not yet supported
  172.     /m    sets the basic unit to be the millimeter (default is inch)
  173.     /o    file overwrite permission (without this switch, user will be
  174.                  prompted for permission if output file already exists)
  175.     /e    use HP 'emulate' switch setting criteria (not fully supported)
  176.     /n#   set plotter units per base unit (default = 1024 per inch, 40 per mm)
  177.     /u#   set user units per base unit for hpgl scaling instruction SC
  178.                  (default = 1)
  179.     /f#   set the precision of reals to # (0-8) digits following the decimal
  180.                  point.  The default is 4.  Omitting # causes variable length
  181.                  decimal fields in reals.
  182.     /s    set scepter configuration (scepter is a pcb design package
  183.                  marketed by Royal Digital Systems of San Jose CA.
  184.                  Version 3.xx of scepter has the bug of producing arcs
  185.                  of 89 degrees when they should be 90).  Setting this switch
  186.                  forces all arcs of 89 degrees to 90 in the output file and
  187.                  sets user units to 1000 to the inch (equivalent to /u1000).
  188.     /d    defeat the exit message
  189.  
  190. "#" following the switches /n and /u may be any decimal number and may contain
  191. a decimal point.  The utility will maintain the accuracy of the number even
  192. though its report to the user console will round it to an integer.
  193.  
  194. Option switches are read from left to right on the command line and a switch
  195. can override one which preceded it.
  196. For example, the switch sequence:  /n400 /m yields millimeter base units
  197. at 40 plotter units per millimeter.  To obtain 400 units per millimeter,
  198. use the sequence /m /n400.
  199. Example 2:  /s /u1024 forces 89 degree arcs to 90 degrees and resets the
  200. user units to 1024.
  201.  
  202.  
  203.  
  204.  
  205. The following message appears upon successful termination of the program:
  206.  
  207. If you find HPGL2DXF to be useful, a contribution toward the programming effort
  208. would be appreciated.  The amount of the contribution should represent the
  209. value of the utility to you.  We suggest something in the range of $5 to $50.
  210.  
  211. Quantum Diagnostics Inc will register contributors.  Registry offers the
  212. user access by telephone to the programmer to discuss bugs, proposed
  213. enhancements, implementation and operating philosophy, praise, complaints,
  214. hate mail, death threats, and other pertinent topics.
  215.  
  216. Contributors of $45 or more will receive upon request, for a $6 materials
  217. and postage charge, the complete source code on diskette (5.25 or 3.5).
  218.  
  219. Thank you.  We at Quantum Diagnostics Inc bid you good bye and good weather.
  220.  
  221. Quantum Diagnostics, Inc.
  222. 420 Apollo Ste C
  223. Brea, CA 92621
  224. 714-990-5020
  225.                                    - 30 -
  226.  
  227. HPGL2DXF was written in C and compiled and linked with the Microsoft C Compiler
  228. version 5.1.
  229.